package com.itheima_01;

public class StringDemo {
    public static void main(String[] args) {
//      空白字符串
        String s1 = new String();
        System.out.println("s1:" + s1);

//      字符
        char [] chs = {'a', 'b', 'c'};
        String s2 = new String(chs);
        System.out.println("s2:" + s2);

//      字节
        byte [] bys = {97, 98, 99};
        String s3 = new String(bys);
        System.out.println("s3:" + s3);

//      直接赋值
        String s4 = "abc";
        System.out.println("s4:" + s4);

//      推荐使用直接赋值的方式得到字符串对象
    }
}
